package com.twu.biblioteca;

import java.util.List;

/**
 * Created by jpaukows on 9/24/14.
 */
public class View {
    private boolean showingWelcomeMessage = false;
    private boolean showingBookList = false;
    private Printer printer;

    public View(Printer printer) {

        this.printer = printer;
    }


    public void showWelcomeMessage() {
        printer.printLine("Welcome!!!");
        showingWelcomeMessage = true;
    }

    public boolean isShowingWelcomeMessage() {
        return showingWelcomeMessage;
    }

    public boolean isShowingBookList() {
        return showingBookList;
    }

    public void setShowingBookList(boolean showingBookList) {
        this.showingBookList = showingBookList;
    }

    public void showBookList(List<Book> books) {
        for (Book book : books) {
            printer.printLine(book.getPropertiesInColumnFormat());
        }
        showingBookList = true;
    }

    public void showMenu(Menu menu) {

    }
}
